home *** CD-ROM | disk | FTP | other *** search
- // ************************************************************************ //
- // [WARNING] [WARNING] [WARNING] [WARNING] [WARNING] [WARNING] [WARNING] //
- // //
- // The types declared in this file were generated from data read from a //
- // Type Library. If this type library is explicitly or indirectly (via //
- // another type library referring to this type library) re-imported, or the //
- // 'Refresh' command of the Type Library Editor activated while editing the //
- // Type Library, the contents of this file will be regenerated and all //
- // manual modifications will be lost. //
- // ************************************************************************ //
-
- // ************************************************************************ //
- // IID\LCID: {921449E3-8905-11D1-B695-0020AF3F4B77}\0
- // ************************************************************************ //
-
- #include <vcl.h>
- #pragma hdrstop
-
- #include "srvr_TLB.h"
-
- #pragma package(smart_init)
-
- namespace Srvr_tlb
- {
-
-
- // *********************************************************************//
- // GUIDS declared in the TypeLibrary //
- // *********************************************************************//
- extern "C" const GUID LIBID_srvr = {0x921449E3, 0x8905, 0x11D1,{ 0xB6, 0x95, 0x00, 0x20, 0xAF, 0x3F, 0x4B, 0x77} };
- extern "C" const GUID IID_IEditServer = {0x921449E4, 0x8905, 0x11D1,{ 0xB6, 0x95, 0x00, 0x20, 0xAF, 0x3F, 0x4B, 0x77} };
- extern "C" const GUID CLSID_EditServer = {0x921449E5, 0x8905, 0x11D1,{ 0xB6, 0x95, 0x00, 0x20, 0xAF, 0x3F, 0x4B, 0x77} };
-
-
-
- // *********************************************************************//
- // COCLASS DEFAULT INTERFACE CREATOR
- // (The following methods provide an easy way to create an instance of
- // the default interface, IEditServer, of the CoClass EditServer)
- // *********************************************************************//
-
- HRESULT CoEditServer::Create(TCOMIEditServer& _intf)
- {
- static TInitOle __initializeOle;
- return CoCreateInstance(CLSID_EditServer, IID_IEditServer, (LPVOID*)&_intf);
- };
-
- TCOMIEditServer CoEditServer::Create(void)
- {
- TCOMIEditServer _intf;
- Create(_intf);
- return _intf;
- };
-
- HRESULT CoEditServer::CreateRemote(LPWSTR machineName, TCOMIEditServer& _intf)
- {
- static TInitOle __initializeOle;
- COSERVERINFO ServerInfo = { 0, machineName, NULL, 0 };
- MULTI_QI MQI = { &IID_IEditServer, NULL, 0 };
- HRESULT _hr = ::CoCreateInstanceEx(CLSID_EditServer, NULL,
- CLSCTX_LOCAL_SERVER|
- CLSCTX_REMOTE_SERVER|
- CLSCTX_INPROC_SERVER,
- &ServerInfo, 1, &MQI);
- if (SUCCEEDED(_hr))
- _intf = (IEditServer*)MQI.pItf;
- return _hr;
- };
-
- TCOMIEditServer CoEditServer::CreateRemote(LPWSTR machineName)
- {
- TCOMIEditServer _intf;
- CreateRemote(machineName, _intf);
- return _intf;
- };
-
- }; // namespace Srvr_tlb
-